/* 获取轮播图片 */
function bannerPic(){
    $.ajax({
        type:'get',
        url:'http://192.168.1.110:8088/banner',
        success:function(result){
            if(result.resultCode == 1){
                let data = result.resultInfo
                let bannerHtml = template('bannerPic',data)
                $('#banner').append(bannerHtml)
                swiper()
            }
        }
    })
}

function swiper(){
    var mySwiper = new Swiper('.swiper-container', {
        autoplay: true,
        loop: true, // 循环模式选项
        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },
        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        }
    })
}
bannerPic()